Release 10.1A: OpenEdge Development:
Programming Interfaces
Example of changing values in the WRITER-STATUS attribute
Here is a code snippet (just the writer methods) that demonstrates the way that the
WRITER-STATUSchanges.
If
STRICTis set toFALSEthen calling a method while in the wrong state will not affect the XML document or the status of the writer. The method will not fail, the writer will write the data out, and theWRITE-STATUSwill be set accordingly.WRITE-STATUSwill only be set toSAX-WRITE-ERRORif there is a problem with the destination or proxml library atSTART-DOCUMENT.If
STRICTis set toTRUEthen each of these invalid cases will returnFALSEand an error message will be generated:
<method_name>invalid whileWRITE-STATUSis<state_name>.In this case the stream is closed and the
WRITE-STATUSis change toSAX-WRITE-ERROR.If there is a problem with the output destination or the proxml library, then regardless of the setting of
STRICT, theWRITE-STATUSwill be set toSAX-WRITE-ERROR. One of the following error messages will be generated:Unable to write to output destination.
The
proxml.dllorlibproxml.sowas missing or incomplete or XML could not be initialized.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |